package service.impl;

import dao.impl.petDaoImpl;
import entity.Pet;
import service.petService;

import java.util.ArrayList;
import java.util.List;

public class petServiceImpl implements petService {
    petDaoImpl dais=new petDaoImpl();

    @Override
    public List<Pet> SelectPetinAll() {
       List<Pet> list=new ArrayList<>();
       list=dais.SelectPetinAll();

       if (null!=list){
           return list;
       }

        return null;
    }

    @Override
    public List<Pet> SelectPetinBreed(String Breed) {
        List<Pet> list=new ArrayList<>();
        if (null!=Breed){
            list=dais.SelectPetinBreed(Breed);
            if (null!=list){
                return list;
            }
        }

        return null;
    }

    @Override
    public int addPet(Pet pet) {
        if (null!=pet){
            return dais.addPet(pet);
        }
        return 0;
    }
}
